package com.coin.framework.bean;

import java.io.Serializable;

public class ResultForm<T> implements Serializable {

	private static final long serialVersionUID = 1574648053951183238L;

	private Boolean status;
	
	private T result;
	
	private String message;

	public ResultForm(Boolean status, T result, String message) {
		super();
		this.status = status;
		this.result = result;
		this.message = message;
	}
	
	public static <T> ResultForm<T> createSuccessResultForm(T result, String message) {
		return new ResultForm<T>(Boolean.TRUE, result, message);
	}
	
	public static <T> ResultForm<T> createErrorResultForm(T result, String message) {
		return new ResultForm<T>(Boolean.FALSE, result, message);
	}
	
	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
}
